<?php
class Macys_Form_V2Category extends Zend_Form {
	
	public function init() {
		//$this->setMethod('GET');
		$this->setOptions(array(
			'elements' => array(
				'categoryHierarchyDepth' => array(
					'type' => 'text',
					'options' => array(
						'label' => 'Category Hierarchy Depth',
					)
				),
				'resultsPerPage' => array(
					'type' => 'text',
					'options' => array(
						'label' => 'Results Per Page',
					)
				),
				'currentPage' => array(
					'type' => 'text',
					'options' => array(
						'label' => 'Current Page',
					)
				),
				'includeRefinements' => array(
					'type' => 'select',
					'options' => array(
						'label' => 'Include Refinements',
						 'attribs' =>   array(
                                'id'=>'includeRefinements',
                            ),
            			'multioptions'   => array(
                            	'' => '',
            					'YES' => 'Yes',                
            					'ONLY' => 'Only',
                            	'NO' => 'No',
                            ),
					)
				),
				
				
				
				'sortBy' => array(
					'type' => 'select',
					'options' => array(
						'label' => 'Sort By',
						'attribs' =>   array(
                                'id'=>'sortBy',
                            ),
            			'multioptions'   => array(
                            '' => '',
            				'CUSTOMER_RATING' => 'Customer Ratings',	
                            'PRICE' => 'Price',                
            					'NAME' => 'Name',
                            	'CREATED' => 'Created',
                            ),
					)
				),
				'sortOrder' => array(
					'type' => 'select',
					'options' => array(
						'label' => 'Sort Order',
						'attribs' =>   array(
                                'id'=>'sortOrder',
                            ),
            			'multioptions'   => array(
                             '' => '',
            					'ASC' => 'Ascending',                
            					'DESC' => 'Descending',
                            ),
					)
				),
				'imageQuality' => array(
					'type' => 'text',
					'options' => array(
						'label' => 'Image Quality',
					)
				),
				'imageWidth' => array(
					'type' => 'text',
					'options' => array(
						'label' => 'Image Width',
					)
				),
				
				
				'submit' => array(
					'type' => 'submit',
					'options' => array(
						'label' => 'Apply'
					)
				)
			),
		));
		
		
		$this->addDisplayGroups(array(
			'left' => array(
				'options'  => array('description' => 'Display Options'),
				'elements' => array('sortBy','sortOrder'),
			),
			'left2' => array(
				'options'  => array('description' => 'Display Options'),
				'elements' => array( 'resultsPerPage', 'currentPage'),
			),
			'right' => array(
				'options'  => array('description' => 'Image Options'),
				'elements' => array('imageQuality', 'imageWidth'),
			),
			'middle' => array(
				'options'  => array('description' => 'Navigation Options'),
				'elements' => array('categoryHierarchyDepth', 'includeRefinements'),
			),
			'bottom' => array(
				'elements' => array('submit'),
			)
		));

		$this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));
		
	}
	
}